package com.muse.designpatterns.chain;


import org.apache.commons.collections4.CollectionUtils;

import java.util.List;

public class CeoProcessor extends AbstractProcessor {
    @Override
    protected int emailType() {
        return EmailType.FANS_EMAIL.type;
    }

    @Override
    protected void execute(List<Email> emails) {
        if(CollectionUtils.isNotEmpty(emails)){
            System.out.println("CEO开始处理邮件");
            emails.stream().forEach(email -> System.out.println(email.getContent()));
        }
    }
}
